Optimal. Leaf size=110 \[ \frac {x^{1+m} \sec \left (a+2 \log \left (c x^{\frac {1}{2} \sqrt {-(1+m)^2}}\right )\right )}{2 (1+m)}+\frac {x^{1+m} \sec \left (a+2 \log \left (c x^{\frac {1}{2} \sqrt {-(1+m)^2}}\right )\right ) \tan \left (a+2 \log \left (c x^{\frac {1}{2} \sqrt {-(1+m)^2}}\right )\right )}{2 \sqrt {-(1+m)^2}} \]
[Out]
________________________________________________________________________________________
Rubi [C] Result contains higher order function than in optimal. Order 5 vs. order 3 in
optimal.
time = 0.14, antiderivative size = 146, normalized size of antiderivative = 1.33, number of steps
used = 3, number of rules used = 3, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.097, Rules used = {4605, 4601,
371} \begin {gather*} \frac {8 e^{3 i a} x^{m+1} \left (c x^{\frac {1}{2} \sqrt {-(m+1)^2}}\right )^{6 i} \, _2F_1\left (3,\frac {1}{2} \left (3-\frac {i (m+1)}{\sqrt {-(m+1)^2}}\right );\frac {1}{2} \left (5-\frac {i (m+1)}{\sqrt {-(m+1)^2}}\right );-e^{2 i a} \left (c x^{\frac {1}{2} \sqrt {-(m+1)^2}}\right )^{4 i}\right )}{1-i \left (-3 \sqrt {-(m+1)^2}+i m\right )} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
Rule 371
Rule 4601
Rule 4605
Rubi steps
\begin {align*} \int x^m \sec ^3\left (a+2 \log \left (c x^{\frac {1}{2} \sqrt {-(1+m)^2}}\right )\right ) \, dx &=\frac {\left (2 x^{1+m} \left (c x^{\frac {1}{2} \sqrt {-(1+m)^2}}\right )^{-\frac {2 (1+m)}{\sqrt {-(1+m)^2}}}\right ) \text {Subst}\left (\int x^{-1+\frac {2 (1+m)}{\sqrt {-(1+m)^2}}} \sec ^3(a+2 \log (x)) \, dx,x,c x^{\frac {1}{2} \sqrt {-(1+m)^2}}\right )}{\sqrt {-(1+m)^2}}\\ &=\frac {\left (16 e^{3 i a} x^{1+m} \left (c x^{\frac {1}{2} \sqrt {-(1+m)^2}}\right )^{-\frac {2 (1+m)}{\sqrt {-(1+m)^2}}}\right ) \text {Subst}\left (\int \frac {x^{(-1+6 i)+\frac {2 (1+m)}{\sqrt {-(1+m)^2}}}}{\left (1+e^{2 i a} x^{4 i}\right )^3} \, dx,x,c x^{\frac {1}{2} \sqrt {-(1+m)^2}}\right )}{\sqrt {-(1+m)^2}}\\ &=\frac {8 e^{3 i a} x^{1+m} \left (c x^{\frac {1}{2} \sqrt {-(1+m)^2}}\right )^{6 i} \, _2F_1\left (3,\frac {1}{2} \left (3-\frac {i (1+m)}{\sqrt {-(1+m)^2}}\right );\frac {1}{2} \left (5-\frac {i (1+m)}{\sqrt {-(1+m)^2}}\right );-e^{2 i a} \left (c x^{\frac {1}{2} \sqrt {-(1+m)^2}}\right )^{4 i}\right )}{1-i \left (i m-3 \sqrt {-(1+m)^2}\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 2.29, size = 198, normalized size = 1.80 \begin {gather*} \frac {x^{1+m} \left ((1+m) \cos \left (a+2 \log \left (c x^{\frac {1}{2} \sqrt {-(1+m)^2}}\right )\right )-\sqrt {-(1+m)^2} \sin \left (a+2 \log \left (c x^{\frac {1}{2} \sqrt {-(1+m)^2}}\right )\right )\right )}{2 (1+m)^2 \left (\cos \left (\frac {a}{2}+\log \left (c x^{\frac {1}{2} \sqrt {-(1+m)^2}}\right )\right )-\sin \left (\frac {a}{2}+\log \left (c x^{\frac {1}{2} \sqrt {-(1+m)^2}}\right )\right )\right )^2 \left (\cos \left (\frac {a}{2}+\log \left (c x^{\frac {1}{2} \sqrt {-(1+m)^2}}\right )\right )+\sin \left (\frac {a}{2}+\log \left (c x^{\frac {1}{2} \sqrt {-(1+m)^2}}\right )\right )\right )^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.15, size = 0, normalized size = 0.00 \[\int x^{m} \left (\sec ^{3}\left (a +2 \ln \left (c \,x^{\frac {\sqrt {-\left (1+m \right )^{2}}}{2}}\right )\right )\right )\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 976 vs.
\(2 (92) = 184\).
time = 0.37, size = 976, normalized size = 8.87 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] Result contains complex when optimal does not.
time = 2.07, size = 81, normalized size = 0.74 \begin {gather*} -\frac {2 \, {\left (2 \, x^{2} x^{2 \, m} e^{\left (3 i \, a + 6 i \, \log \left (c\right )\right )} + e^{\left (5 i \, a + 10 i \, \log \left (c\right )\right )}\right )}}{{\left (m + 1\right )} x^{4} x^{4 \, m} + 2 \, {\left (m + 1\right )} x^{2} x^{2 \, m} e^{\left (2 i \, a + 4 i \, \log \left (c\right )\right )} + {\left (m + 1\right )} e^{\left (4 i \, a + 8 i \, \log \left (c\right )\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [C] Result contains complex when optimal does not.
time = 5.79, size = 834, normalized size = 7.58 \begin {gather*} \frac {c^{6 i} m x x^{m} x^{{\left | m + 1 \right |}} e^{\left (3 i \, a\right )}}{c^{8 i} m^{2} e^{\left (4 i \, a\right )} + 2 \, c^{8 i} m e^{\left (4 i \, a\right )} + c^{8 i} e^{\left (4 i \, a\right )} + 2 \, c^{4 i} m^{2} x^{2 \, {\left | m + 1 \right |}} e^{\left (2 i \, a\right )} + 4 \, c^{4 i} m x^{2 \, {\left | m + 1 \right |}} e^{\left (2 i \, a\right )} + 2 \, c^{4 i} x^{2 \, {\left | m + 1 \right |}} e^{\left (2 i \, a\right )} + m^{2} x^{4 \, {\left | m + 1 \right |}} + 2 \, m x^{4 \, {\left | m + 1 \right |}} + x^{4 \, {\left | m + 1 \right |}}} - \frac {c^{6 i} x x^{m} x^{{\left | m + 1 \right |}} {\left | m + 1 \right |} e^{\left (3 i \, a\right )}}{c^{8 i} m^{2} e^{\left (4 i \, a\right )} + 2 \, c^{8 i} m e^{\left (4 i \, a\right )} + c^{8 i} e^{\left (4 i \, a\right )} + 2 \, c^{4 i} m^{2} x^{2 \, {\left | m + 1 \right |}} e^{\left (2 i \, a\right )} + 4 \, c^{4 i} m x^{2 \, {\left | m + 1 \right |}} e^{\left (2 i \, a\right )} + 2 \, c^{4 i} x^{2 \, {\left | m + 1 \right |}} e^{\left (2 i \, a\right )} + m^{2} x^{4 \, {\left | m + 1 \right |}} + 2 \, m x^{4 \, {\left | m + 1 \right |}} + x^{4 \, {\left | m + 1 \right |}}} + \frac {c^{6 i} x x^{m} x^{{\left | m + 1 \right |}} e^{\left (3 i \, a\right )}}{c^{8 i} m^{2} e^{\left (4 i \, a\right )} + 2 \, c^{8 i} m e^{\left (4 i \, a\right )} + c^{8 i} e^{\left (4 i \, a\right )} + 2 \, c^{4 i} m^{2} x^{2 \, {\left | m + 1 \right |}} e^{\left (2 i \, a\right )} + 4 \, c^{4 i} m x^{2 \, {\left | m + 1 \right |}} e^{\left (2 i \, a\right )} + 2 \, c^{4 i} x^{2 \, {\left | m + 1 \right |}} e^{\left (2 i \, a\right )} + m^{2} x^{4 \, {\left | m + 1 \right |}} + 2 \, m x^{4 \, {\left | m + 1 \right |}} + x^{4 \, {\left | m + 1 \right |}}} + \frac {c^{2 i} m x x^{m} x^{3 \, {\left | m + 1 \right |}} e^{\left (i \, a\right )}}{c^{8 i} m^{2} e^{\left (4 i \, a\right )} + 2 \, c^{8 i} m e^{\left (4 i \, a\right )} + c^{8 i} e^{\left (4 i \, a\right )} + 2 \, c^{4 i} m^{2} x^{2 \, {\left | m + 1 \right |}} e^{\left (2 i \, a\right )} + 4 \, c^{4 i} m x^{2 \, {\left | m + 1 \right |}} e^{\left (2 i \, a\right )} + 2 \, c^{4 i} x^{2 \, {\left | m + 1 \right |}} e^{\left (2 i \, a\right )} + m^{2} x^{4 \, {\left | m + 1 \right |}} + 2 \, m x^{4 \, {\left | m + 1 \right |}} + x^{4 \, {\left | m + 1 \right |}}} + \frac {c^{2 i} x x^{m} x^{3 \, {\left | m + 1 \right |}} {\left | m + 1 \right |} e^{\left (i \, a\right )}}{c^{8 i} m^{2} e^{\left (4 i \, a\right )} + 2 \, c^{8 i} m e^{\left (4 i \, a\right )} + c^{8 i} e^{\left (4 i \, a\right )} + 2 \, c^{4 i} m^{2} x^{2 \, {\left | m + 1 \right |}} e^{\left (2 i \, a\right )} + 4 \, c^{4 i} m x^{2 \, {\left | m + 1 \right |}} e^{\left (2 i \, a\right )} + 2 \, c^{4 i} x^{2 \, {\left | m + 1 \right |}} e^{\left (2 i \, a\right )} + m^{2} x^{4 \, {\left | m + 1 \right |}} + 2 \, m x^{4 \, {\left | m + 1 \right |}} + x^{4 \, {\left | m + 1 \right |}}} + \frac {c^{2 i} x x^{m} x^{3 \, {\left | m + 1 \right |}} e^{\left (i \, a\right )}}{c^{8 i} m^{2} e^{\left (4 i \, a\right )} + 2 \, c^{8 i} m e^{\left (4 i \, a\right )} + c^{8 i} e^{\left (4 i \, a\right )} + 2 \, c^{4 i} m^{2} x^{2 \, {\left | m + 1 \right |}} e^{\left (2 i \, a\right )} + 4 \, c^{4 i} m x^{2 \, {\left | m + 1 \right |}} e^{\left (2 i \, a\right )} + 2 \, c^{4 i} x^{2 \, {\left | m + 1 \right |}} e^{\left (2 i \, a\right )} + m^{2} x^{4 \, {\left | m + 1 \right |}} + 2 \, m x^{4 \, {\left | m + 1 \right |}} + x^{4 \, {\left | m + 1 \right |}}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 6.96, size = 176, normalized size = 1.60 \begin {gather*} \frac {\frac {x^{m+1}\,{\mathrm {e}}^{a\,1{}\mathrm {i}}\,{\left (c\,x^{\frac {\sqrt {-m^2-2\,m-1}}{2}}\right )}^{2{}\mathrm {i}}\,\left (m\,1{}\mathrm {i}+\sqrt {-{\left (m+1\right )}^2}+1{}\mathrm {i}\right )}{\sqrt {-{\left (m+1\right )}^2}}-\frac {x^{m+1}\,{\mathrm {e}}^{a\,1{}\mathrm {i}}\,{\left (c\,x^{\frac {\sqrt {-m^2-2\,m-1}}{2}}\right )}^{6{}\mathrm {i}}\,\left ({\mathrm {e}}^{a\,2{}\mathrm {i}}\,1{}\mathrm {i}-{\mathrm {e}}^{a\,2{}\mathrm {i}}\,\sqrt {-{\left (m+1\right )}^2}+m\,{\mathrm {e}}^{a\,2{}\mathrm {i}}\,1{}\mathrm {i}\right )}{\sqrt {-{\left (m+1\right )}^2}}}{\left (m+1\right )\,{\left ({\mathrm {e}}^{a\,2{}\mathrm {i}}\,{\left (c\,x^{\frac {\sqrt {-m^2-2\,m-1}}{2}}\right )}^{4{}\mathrm {i}}+1\right )}^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________